package com.carl.core;

import com.carl.annotation.MyController;
import com.carl.annotation.MyRequestMapping;
import com.carl.annotation.MyRequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@MyController
@MyRequestMapping("/demo")
public class DemoController {

    @MyRequestMapping("/01-test")
    public void testA(HttpServletRequest request , HttpServletResponse response ,
                      @MyRequestParam("param") String param)throws Exception{
        System.out.println("  param : " + param);
        response.getWriter().write(" 01-test suceess ! param = " + param);
    }

    @MyRequestMapping("/02-test")
    public void testB(HttpServletRequest request , HttpServletResponse response)throws Exception{
        response.getWriter().println("$$$ 02-test method success! $$ ");
    }


}
